import {createRouter} from "vue-router";
import {createWebHashHistory} from "vue-router";

const routes = [
    {path: '/', component: () => import("@/components/account/login.vue")},
    {path: '/login', component: () => import("@/components/account/login.vue")},
    {path:'/newAccount',component:()=>import("@/components/account/newAccount.vue")},
    {path:'/editAccount',component:()=>import("@/components/account/editAccount.vue")},
    {path:`/jpetstore/pets/search/:keyword`,component:()=>import("@/components/catalog/searchProduct.vue")},
    {path:'/catalog/help',component:()=>import("@/components/common/help.vue")},
    {path: '/category', component: () => import("@/components/catalog/category.vue")},
    {path: '/product', component: () => import("@/components/catalog/product.vue")},
    {path:'/main',component:()=>import("@/components/catalog/main.vue")},
    {path:'/item',component:()=>import("@/components/catalog/item.vue")},
    {path: '/newOrder',component:()=>import("@/components/order/newOrder.vue")},
    {path: '/myOrder',component:()=>import("@/components/order/myOrder.vue")},
    {path: '/orderSuccess',component:()=>import("@/components/order/orderSuccess.vue")},
    {path: '/cart',component:()=>import("@/components/cart/cart.vue")}
]


const router = createRouter({ 
    history: createWebHashHistory(),
    base:'jpet',
    routes
})

export default router